package com.dimao.certificate_build_service.http;

import io.vertx.core.json.JsonObject;

public class FailedReply extends Reply {
    private Throwable cause;

    public FailedReply(Throwable cause) {
        super(false);
        setThrowable(cause);
    }

    public JsonObject toJson(){
        return super.toJson().put("msg", cause.getMessage());
    }

    public Throwable getThrowable() {
        return cause;
    }

    public void setThrowable(Throwable cause) {
        this.cause = cause;
    }
}
